﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="SurveyAssetData" targetNamespace="http://tempuri.org/SurveyAssetData.xsd" xmlns:mstns="http://tempuri.org/SurveyAssetData.xsd" xmlns="http://tempuri.org/SurveyAssetData.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SurveyProjectConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="SurveyProjectConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Votations.NSurvey.BE.Properties.Settings.GlobalReference.Default.SurveyProjectConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="SurveyAssetDataTableAdapter" GeneratorDataComponentClassName="SurveyAssetDataTableAdapter" Name="SurveyAssetData" UserDataComponentName="SurveyAssetDataTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SurveyProjectConnectionString (Settings)" DbObjectName="SurveyProject.dbo.vts_tbSurveyAsset" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[vts_tbSurveyAsset] WHERE (([AssetId] = @Original_AssetId) AND ([SurveyId] = @Original_SurveyId) AND ([AssetType] = @Original_AssetType) AND ([Name] = @Original_Name))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_AssetId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="AssetId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_AssetType" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetType" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[vts_tbSurveyAsset] ([SurveyId], [AssetType], [Name]) VALUES (@SurveyId, @AssetType, @Name);
SELECT AssetId, SurveyId, AssetType, Name FROM vts_tbSurveyAsset WHERE (AssetId = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@AssetType" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetType" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT AssetId, SurveyId, AssetType, Name FROM dbo.vts_tbSurveyAsset</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[vts_tbSurveyAsset] SET [SurveyId] = @SurveyId, [AssetType] = @AssetType, [Name] = @Name WHERE (([AssetId] = @Original_AssetId) AND ([SurveyId] = @Original_SurveyId) AND ([AssetType] = @Original_AssetType) AND ([Name] = @Original_Name));
SELECT AssetId, SurveyId, AssetType, Name FROM vts_tbSurveyAsset WHERE (AssetId = @AssetId)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@AssetType" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetType" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_AssetId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="AssetId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_AssetType" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetType" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="AssetId" ColumnName="AssetId" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@AssetId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssetId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="AssetId" DataSetColumn="AssetId" />
              <Mapping SourceColumn="SurveyId" DataSetColumn="SurveyId" />
              <Mapping SourceColumn="AssetType" DataSetColumn="AssetType" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="SurveyAssetData" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="SurveyAssetData" msprop:Generator_UserDSName="SurveyAssetData">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="SurveyAssetData" msprop:Generator_TableClassName="SurveyAssetDataDataTable" msprop:Generator_TableVarName="tableSurveyAssetData" msprop:Generator_TablePropName="_SurveyAssetData" msprop:Generator_RowDeletingName="SurveyAssetDataRowDeleting" msprop:Generator_UserTableName="SurveyAssetData" msprop:Generator_RowChangingName="SurveyAssetDataRowChanging" msprop:Generator_RowEvHandlerName="SurveyAssetDataRowChangeEventHandler" msprop:Generator_RowDeletedName="SurveyAssetDataRowDeleted" msprop:Generator_RowEvArgName="SurveyAssetDataRowChangeEvent" msprop:Generator_RowChangedName="SurveyAssetDataRowChanged" msprop:Generator_RowClassName="SurveyAssetDataRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AssetId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnAssetId" msprop:Generator_ColumnPropNameInRow="AssetId" msprop:Generator_ColumnPropNameInTable="AssetIdColumn" msprop:Generator_UserColumnName="AssetId" type="xs:int" />
              <xs:element name="SurveyId" msprop:Generator_ColumnVarNameInTable="columnSurveyId" msprop:Generator_ColumnPropNameInRow="SurveyId" msprop:Generator_ColumnPropNameInTable="SurveyIdColumn" msprop:Generator_UserColumnName="SurveyId" type="xs:int" />
              <xs:element name="AssetType" msprop:Generator_ColumnVarNameInTable="columnAssetType" msprop:Generator_ColumnPropNameInRow="AssetType" msprop:Generator_ColumnPropNameInTable="AssetTypeColumn" msprop:Generator_UserColumnName="AssetType">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_UserColumnName="Name">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="300" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:SurveyAssetData" />
      <xs:field xpath="mstns:AssetId" />
    </xs:unique>
  </xs:element>
</xs:schema>